/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.p10.miage.gestionabsence.model;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 *
 * @author huynal
 */
public class Promotion {
    
    private int idP;
    private int idF;
    private int annee;
    private int nbrGrp;

    public Promotion() {
    }

    public Promotion(int idP, int idF, int annee, int nbrGrp) {
        this.idP = idP;
        this.idF = idF;
        this.annee = annee;
        this.nbrGrp = nbrGrp;
    }

    public int getAnnee() {
        return annee;
    }

    public void setAnnee(int annee) {
        this.annee = annee;
    }

    public int getIdF() {
        return idF;
    }

    public void setIdF(int idF) {
        this.idF = idF;
    }

    public int getIdP() {
        return idP;
    }

    public void setIdP(int idP) {
        this.idP = idP;
    }

    public int getNbrGrp() {
        return nbrGrp;
    }

    public void setNbrGrp(int nbrGrp) {
        this.nbrGrp = nbrGrp;
    }
    
    public void init(ResultSet resultat) throws SQLException{
        this.idP = resultat.getInt("IDP");
        this.idF = resultat.getInt("IDF");
        this.annee = resultat.getInt("ANNEE");
        this.nbrGrp = resultat.getInt("NBRGRP");
    }
}
